/'	
	
		FB.Strings - Various string functions for FreeBASIC
	
		version: 1.1
		
		authors:
			- Aleksandar Ruzicic <krckoorascic@gmail.com>	
'/

#Ifndef __FB_STRINGS_BI__
#Define __FB_STRINGS_BI__
	
	Namespace FB.Strings
		
		Enum CompareMethod
			BinaryCompare
			TextCompare
		End Enum
		
		Type StrCharReplacer As Function(ByVal As UByte, ByVal As UInteger) As String 	
		
		Declare Function StrReplace OverLoad(ByRef As Const String, ByRef As Const String, ByRef As Const String, ByRef As Integer = 0, ByVal As Const Integer = 0, ByVal As Const CompareMethod = BinaryCompare) As String
		Declare Function StrReplace(ByRef As Const String, find() As String, replace() As String, ByRef As Integer = 0, ByVal As Const Integer = 0, ByVal As Const CompareMethod = BinaryCompare) As String
		Declare Function StrReplace(ByRef As Const String, find() As String, ByRef As Const String, ByRef As Integer = 0, ByVal As Const Integer = 0, ByVal As Const CompareMethod = BinaryCompare) As String
		Declare Function StrReplace(source() As String, find() As String, replace() As String, result() As String, ByRef As Integer = 0, ByVal As Const Integer = 0, ByVal As Const CompareMethod = BinaryCompare) As Integer
		Declare Function StrReverse(ByRef As Const String) As String
		Declare Function StrAlignLeft(ByRef As Const String, ByVal As Const Integer, ByRef As Const String = " ") As String
		Declare Function StrAlignRight(ByRef As Const String, ByVal As Const Integer, ByRef As Const String = " ") As String		
		Declare Function StrAlignCenter(ByRef As Const String, ByVal As Const Integer, ByRef As Const String = " ") As String
		Declare Function StrRepeat(ByRef As Const String, ByVal As Const Integer) As String
		Declare Function StrCount(ByRef As Const String, ByRef As Const String, ByVal As Const CompareMethod = BinaryCompare) As Integer
		Declare Function StrInPattern OverLoad(ByVal As Const Ubyte, ByRef As Const String) As Integer
		Declare Function StrInPattern(ByRef As Const String, ByRef As Const String) As Integer
		Declare Function StrCountChars(ByRef As Const String, ByRef As Const String) As Integer
		Declare Function StrReplaceChars OverLoad(ByRef As Const String, ByRef As Const String, ByVal As Const StrCharReplacer) As String
		Declare Function StrReplaceChars(ByRef As Const String, ByRef As Const String, ByRef As Const String) As String
		Declare Function StrRemoveChars(ByRef As Const String, ByRef As Const String) As String
		Declare Function StrExplode(ByRef As Const String, ByRef As Const String, res() As String, ByVal As Const CompareMethod = BinaryCompare) As Integer 
		Declare Function StrImplode(array() As String, ByRef As Const String = " ") As String
		Declare Function StrSplitByChar(ByRef As Const String, ByRef As Const String, res() As String) As Integer
		Declare Function StrLines(ByRef As Const String, res() As String) As Integer
		Declare Function StrExpandTabs(ByRef As Const String, ByVal As Const Integer = 8) As String
		Declare Function StrLike(ByRef As Const String, ByRef As Const String, ByVal As Const CompareMethod = BinaryCompare) As Integer
		
		Declare Function StrSubstring(ByRef As Const String, ByVal As Integer, ByVal As Integer = 0) As String
		Declare Function StrWordwrap(ByRef As Const String, ByVal As Const Integer = 80, ByRef As Const String = !"\n", ByVal As Const Integer = 0) As String
			
	End Namespace
	
	#Ifndef __FB_STRINGS_NO_INCLIB__
	#Inclib "fbstrings" 
	#EndIf

#EndIf